package mycompany.helper;

import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author Volodymyr Lavrynovych <volodya.lavrynovych@gmail.com>
 */
public class ApplicationContentHelper extends ContentHelper{
    
    //consts
    private static final String NOTIFIER                = "notifier.js";
    private static final String JQUERY                  = "jquery.js";
    public static final String BOOTSTRAP                = "bootstrap.js";
    public static final String BOOTSTRAP_CSS            = "bootstrap.css";
    public static final String BOOTSTRAP_RESPONSIVE_CSS = "bootstrap-responsive.css";
    private static final String NEW_LINE                = "\n";
    
    // -------------------------------------------------------------------------
    
    /**
     * Constructs an instance
     * @param request defines request
     */
    public ApplicationContentHelper(HttpServletRequest request){
        super(request);
    }
    
    // -------------------------------------------------------------------------
    
    public String getJQuery(){
        return getJs(JQUERY);
    }
    
    public String getNotifier(){
        return getJs(NOTIFIER);
    }
    
    public String getBootstrap(){
        StringBuilder sb = new StringBuilder();
        
        sb.append(getCss(BOOTSTRAP_CSS));
        sb.append(NEW_LINE);
        sb.append(getCss(BOOTSTRAP_RESPONSIVE_CSS));
        sb.append(NEW_LINE);
        sb.append(getJs(BOOTSTRAP));
        
        return sb.toString();
    }
    
    public String getHeader(){
        StringBuilder sb = new StringBuilder();

        //sb.append(getCss("main.css"));
        sb.append(NEW_LINE);
        sb.append(getJQuery());
        sb.append(NEW_LINE);
        //sb.append(getNotifier());
        sb.append(NEW_LINE);
        sb.append(getBootstrap());
        
        return sb.toString();
    }
}
